package com.hsc.www;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.session.data.redis.RedisOperationsSessionRepository;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

@EnableRedisHttpSession
@SpringBootApplication
@EnableAspectJAutoProxy//开启AspectJ注解
@Configuration
public class App1 {
    public static void main(String[] args) {
        SpringApplication.run(App1.class, args);
    }

    @Bean
    RedisTemplate redisTemplate(RedisOperationsSessionRepository redisOperationsSessionRepository){
        return  (RedisTemplate)  redisOperationsSessionRepository.getSessionRedisOperations();
    }








}